![]() The AutoCAD Converter adds one entry to the
conversion lists: This Converter reads and writes DXF files in the ASCII form. The DXF format was designed to represent drawings made in AutoCAD. Through it, many other programs read and write CAD data. The DXF format has become popular format for exchanging CAD drawings and 3D models between many programs. Geometry DXF files are ASCII, that is, they are editable in any text editor. They are broken down into four sections: HEADER, TABLES, BLOCKS, and ENTITIES. Only an ENTITIES section is necessary to convey geometric information, the others are optional. The HEADER section contains the state of AutoCAD internal variables. The TABLES section holds information about named items, such as line types and layers. Definitions of standard objects are stored in the optional BLOCKS section. Finally and most importantly, the ENTITIES section holds all information about the entities that compose the drawing. For example, entities include lines, circles, arcs, and 3D polygons. At minimum, each entity includes the geometric details of the shape. Optional information includes a pen number to use when plotting the entity, and a layer in which it belongs. If a BLOCKS section is present, it holds definitions of grouped objects (composed of entities) that might be inserted at various points in the drawing. AutoCAD loading and saving To load a DXF file from within AutoCAD, use the "DXFIN" command. It asks for a filename, which has the assumed filename extension ".DXF". Supported DXF Entities The closer the fit between your drawing and the entities described below, the better the resulting 3D model. If your drawing does not use these entities, and you're not satisfied with the automatic translation from DXF to your modeling program, then you might try to re-build the object in AutoCAD in order to use entities like these. For example, some AutoCAD drawings include AME and ACIS solid-modeling surfaces. Although this Converter does not translate this data directly, it is possible to select this entity in AutoCAD and ask for it to be reproduced as 3DFACE entities in the shape of the curved surface. This Converter will translate the 3DFACE entities. In general, line width is ignored. All lines are simply translated as two-point polygons. If an entity has an elevation set, the resulting polygons of the entity are displaced upward by that amount. If an entity has thickness, it is extruded: points become lines, lines become four-sided polygons, triangles become prisms, and SOLIDs become cubes. This Converter accepts DXF files that have any combination of line ending characters as used on MS-DOS, Unix and Macintosh. The following entities are translated: POINT LINE 3DLINE 3DFACE SOLID and TRACE POLYLINE A closed polyline is not the same as a polygon. AutoCAD's DXF format is ambiguous about whether a closed POLYLINE entity could be translated as an open shape or as a polygon-like polygon in a 3D modeling program. For example, the POLYLINE might represent lines drawn on a surface, and not a filled shape. Because these line segments are still present as "lone edges" or two-point polygons in many 3D formats, it is possible to re-construct them as true polygons in many 3D modeling programs. Select the correct edges and re-define them as a single polygon. CIRCLE and ARC CIRCLEs with thickness become hollow cylinders with that many sides. ARCs with thickness become a series of polygons in that shape. These extruded polygons are oriented such that they point outward, away from the center point. This is the correct orientation for most programs. On some export Converters, you can flip polygon normals if this isn't the proper orientation, such as if you want to view the object from the inside by default. BLOCKs and INSERTed BLOCKS Untranslated entities Material attributes Options dialog Import section The Arcs and Circles section controls the way ARC and CIRCLE entities are approximated by lines and polygons. If the entity is extruded, each side becomes a polygon itself. Max arc facet length sets an upper bound on the length of the sides that are created to approximate the curve, with the length given in the same units as used in the drawing. It defaults to 10.0, meaning all sides on ARCs and CIRCLEs will be no longer than 10.0 units in length. Min number of arc facets sets the minimum number of sides that will be created to approximate ARC and CIRCLE entities. This sets a lower bound for this density. It defaults to 10, meaning all ARCs and CIRCLEs will be approximated with at least ten sides. Export section Because DXF files are ASCII, you can choose the line ending. Make HEADER controls whether a HEADER section will be included in the file. Some programs, such as AutoCAD itself, use extra information in the header section to properly interpret the file. Many other programs do not require it. General section On import, this section chooses which attribute of DXF entities is used to specify Interchange objects. The choices are None, Pen, Layer and Block. When None is selected, all polygons are assigned to a single object. When Pen is selected, polygons are placed into separate objects based on their ACI pen number. If no pen information is given for an entity, it is placed in a default object. When Layer is selected, the entity's layer information chooses the object. Within AutoCAD, each layer has a name and a default pen number. If an entity has been placed in a layer, then it becomes part of an object with that layer's name. If no layer name is specified, then the polygons are placed in the default object. When Block is set, each INSERTed BLOCK is treated as a separate object. BLOCKs can contain other BLOCKs, so this can build a hierarchy of objects. On export, this section chooses how objects are mapped to AutoCAD entities. When None is selected, polygons are not given any extra information in the DXF file to differentiate between objects. When Pen is selected, each object is given a different pen number. The pen number is chosen as follows: if the object has a name such as "ACI45" then pen 45 would be chosen. Otherwise, objects are assigned unique pen numbers, in sequence from pen 1. If there are more than 255 objects, then pen numbers will be re-used for some objects. When Layer is selected, each object is written to a different layer. If no layer information is selected (that is, neither Objects by or the Color as is set to "Layer") then all entities are placed in layer 0, the default AutoCAD layer. The layer name is derived from the object name. Layer names are limited to 20 characters, upper-case A through Z plus characters '$', '-' and '_'. Any other characters are changed to '$'. The preceeding options will create "entities only" DXF files that do not contain any BLOCK definitions. You can always load "entities only" DXF files into an existing drawing in AutoCAD. If a DXF file contained a BLOCKS section, AutoCAD would only allow it to be loaded into a new drawing. "Entities only" files are also more compatible with more 3D programs. When Block is selected, objects are placed in their own BLOCK definitions and inserted into the entity section of the drawing. BLOCKs will be nested to reflect the hierarchy. Color as section On import, this section chooses which attribute of DXF entities is used to choose Interchange materials. When None is selected, all polygons are given the default pen number 7, a dull white. When Pen is selected, the material for a polygon is taken from the pen number and its corresponding color. If no pen number is assigned, polygons are assigned the material for pen 7, the default white color. When Layer is selected, material names are taken from layer names, and colors are taken from the default color for the layer. Entities placed in these layers take on the corresponding material for that layer. If no layer information is present, default pen 7 material is used. When Block is set, all polygons created from a BLOCK are given a material based on the block's pen number. On export, this section controls the mapping of materials to the attributes of DXF entities. When None is selected, no pen number are assigned. When Pen is selected, each material becomes a different pen number. If more than 254 materials are present, pen numbers are re-used based on a match between the material color and the default pen colors. When Layer is selected, each material becomes a separate layer. Polygons in objects are separated into different layers based on their materials. Layer names are derived from material names. When Block is set, each block is assigned its own pen number. In general, the Objects by setting overrides the Color as setting. For example, on export if you set both Objects by and Color as to Layer, then entities will be assigned layers from their object instead of their color, and no color information will be represented in the file, just as if Color as was set to None. On import, if the Make 2D option is set, then all Y and Z values will be swapped, making a traditional blueprint "stand up" in 3D. On export, if the Make 2D option is set, then this Converter creates a two-dimensional drawing compatible with all versions of AutoCAD. All polygons of two or more points are converted to closed POLYLINE entities. One-point polygons become POINT entities and two-point polygons become two-point POLYLINEs. No hidden-line removal is performed. All edges and sides of polygons are visible in AutoCAD. The default is Make 2D not set. This creates a three-dimensional drawing file, using the more polygon-like entities to represent polygons, as further controlled by the Export polygons as option. Background
|